//
//  FMDetailCell.m
//  LastTemp
//
//  Created by dllo on 15/4/23.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "FMDetailCell.h"
#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height
@implementation FMDetailCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.FMDetailView = [[UIView alloc] init];
        self.FMDetailView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"9"]];
        self.FMDetailView.layer.cornerRadius = 10;
        [self.contentView addSubview:self.FMDetailView];
        [_FMDetailView release];
        
        self.MyImageView = [[UIImageView alloc] init];
        [self.FMDetailView addSubview:self.MyImageView];
        [_MyImageView release];
        
        self.song_nameLabel = [[UILabel alloc] init];
        [self.FMDetailView addSubview:self.song_nameLabel];
        [_song_nameLabel release];
        
        self.singer_name = [[UILabel alloc] init];
        self.singer_name.font = [UIFont systemFontOfSize:14];
        [self.FMDetailView addSubview:self.singer_name];
        [_singer_name release];
    }
    return self;
}
- (void)dealloc
{
    [_singer_name release];
    [_song_nameLabel release];
    [_MyImageView release];
    [_FMDetailView release];
    [super dealloc];
}
- (void)layoutSubviews{
    [super layoutSubviews];
    // 设置尺寸
    self.FMDetailView.frame = CGRectMake(10, 5, WIDTH - 20, HEIGHT - 10);
    self.song_nameLabel.frame = CGRectMake(50, 15, 200, 30);
    self.singer_name.frame = CGRectMake(50, 55, 200, 30);
    self.MyImageView.frame = CGRectMake(self.FMDetailView.frame.size.width - 80, 15, 80, 80);
    self.MyImageView.layer.cornerRadius = 40;
    self.MyImageView.layer.masksToBounds = YES;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
